from etgui import *
from PageLayout import *
from PrefsMirrorEntries import 	MakeItemIncludeDirectives,			\
								MakeItemAdditionalIncludeDirectives,\
								MakeItemConfigurationFiles,			\
								MakeItemPreprocessorDirectives,		\
								MakeItemUseParserComments,			\
								MakeItemAPIPositions

def MakePageParser(model):
##     def MakeInheritFrom():
##         return Form(
##             items=[
##                 "Inherit from",
##                 HBox(
##                     items=[
##                         MakeFieldLayout(ActionButton(-1,"Preferences")), # XXX TBD
##                         MakeFieldLayout(ActionButton(-1,"Superproject(s)"))# XXX TBD
##                     ]
##                 )
##             ]
##         )

	return MakePageLayout(eVObjHExpand|eVObjVCenter,
		MakeBorderedSectionLayout("Parser",
			Form(
				items=MakeItemConfigurationFiles(model,"IgnoreStringsFile")
##                 +["",MakeInheritFrom()]
			),
			PotGuiToggleButton("DoPreprocessing","Preprocess Source Code before Parsing"),
			PotGuiToggleButton("StandardHeaderDependencies","Use Standard Header Dependencies"),
			MakeItemUseParserComments(model,"UseParserComments"),
			MakeItemAPIPositions(model,"APIPositions"),
		), 
##		MakeBorderedSectionLayout("Preprocessing",
##			Form(
##MSA!				items=MakeItemPreprocessorDirectives(model,"PreprocessorSwitch")
##                 +["",MakeInheritFrom()]
##			)
##		),
##		MakeBorderedSectionLayout("Include Directive(s)",
##			Form(
##MSA!				items=MakeItemIncludeDirectives(model,"IncludeMacro")+
##MSA!					MakeItemAdditionalIncludeDirectives(model,"AddIncludeMacro")
##			)
##		)
	)
